echo hstat > .build_XC-1A/mox_compat.hstat
echo hstat > .build_XC-1A/mox_comm_chans.hstat
echo hstat > .build_XC-1A/mox_comm_c.hstat
echo hstat > .build_XC-1A/mox_comm_xc.hstat
echo hstat > .build_XC-1A/mox_comm.hstat
echo hstat > .build_XC-1A/mox_master_c.hstat
echo hstat > .build_XC-1A/mox_master_xc.hstat
echo hstat > .build_XC-1A/mox.hstat
echo hstat > .build_XC-1A/mox_slave_c.hstat
echo hstat > .build_XC-1A/mox_slave_xc.hstat
echo hstat > .build_XC-1A/mox_slave.hstat
echo hstat > .build_XC-1A/mox_storage.hstat
echo hstat > .build_XC-1A/mox_threads.hstat
echo hstat > .build_XC-1A/mox_module.hstat
echo hstat > .build_XC-1A/mox_c.hstat
echo hstat > .build_XC-1A/mox_log.hstat
echo hstat > .build_XC-1A/mox_logger.hstat
echo hstat > .build_XC-1A/spi_master.hstat
echo hstat > .build_XC-1A/spi_flash.hstat
echo hstat > .build_XC-1A/module_flash.hstat
echo hstat > .build_XC-1A/at25.hstat
echo "Updating eclipse config"
.\..\module_xmos_common.1v3\build\auto_proj.exe " <project>MoXOS-Main</project>" < .project > .tmpproject
cmd /c more .tmpproject > .project
cmd /c if not exist .\bin\XC-1A mkdir .\bin\XC-1A > nul
echo Compiling app_shell.c
cd ./.build_XC-1A && xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"   -report -g -O0   ../app_shell.c .././XC-1A.xn -o ../.build_XC-1A/app_shell.o
echo Compiling mox_comm_c.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox_comm_c.c .././XC-1A.xn -o ../.build_XC-1A/mox_comm_c.o
echo Compiling mox_log.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox_log.c .././XC-1A.xn -o ../.build_XC-1A/mox_log.o
echo Compiling mox_logger.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox_logger.c .././XC-1A.xn -o ../.build_XC-1A/mox_logger.o
echo Compiling mox_module.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox_module.c .././XC-1A.xn -o ../.build_XC-1A/mox_module.o
echo Compiling mox_storage.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox_storage.c .././XC-1A.xn -o ../.build_XC-1A/mox_storage.o
echo Compiling mox_threads.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox_threads.c .././XC-1A.xn -o ../.build_XC-1A/mox_threads.o
echo Compiling module_flash.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/module_flash/module_flash.c .././XC-1A.xn -o ../.build_XC-1A/module_flash.o
echo Compiling mox_master_c.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/master/mox_master_c.c .././XC-1A.xn -o ../.build_XC-1A/mox_master_c.o
echo Compiling mox_slave_c.c
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/slave/mox_slave_c.c .././XC-1A.xn -o ../.build_XC-1A/mox_slave_c.o
echo Compiling mox.xc
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox.xc .././XC-1A.xn -o ../.build_XC-1A/mox.o
echo Compiling mox_comm_xc.xc
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/common/mox_comm_xc.xc .././XC-1A.xn -o ../.build_XC-1A/mox_comm_xc.o
echo Compiling spi_flash.xc
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/module_flash/spi_flash.xc .././XC-1A.xn -o ../.build_XC-1A/spi_flash.o
echo Compiling spi_master.xc
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/module_flash/spi_master.xc .././XC-1A.xn -o ../.build_XC-1A/spi_master.o
echo Compiling mox_master_xc.xc
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/master/mox_master_xc.xc .././XC-1A.xn -o ../.build_XC-1A/mox_master_xc.o
echo Compiling mox_slave_xc.xc
xcc -c -I"../." -I".././../MoXOS-Main/src/common" -I".././../MoXOS-Main/src/module_flash" -I".././../MoXOS-Main/src/master" -I".././../MoXOS-Main/src/slave" -I".././../MoXOS-Main/src/headers"  -report -g -O0 -g -O0    .././../MoXOS-Main/src/slave/mox_slave_xc.xc .././XC-1A.xn -o ../.build_XC-1A/mox_slave_xc.o
echo Creating os_flasher.xe
xcc  -report -g -O0  -L  ..\.  -L  ..\.\..\MoXOS-Main  -L  ..\.\..\MoXOS-Main\src  -L  ..\.\..\MoXOS-Main\src\common  -L  ..\.\..\MoXOS-Main\src\headers  -L  ..\.\..\MoXOS-Main\src\master  -L  ..\.\..\MoXOS-Main\src\module_flash  -L  ..\.\..\MoXOS-Main\src\slave  .././.build_XC-1A/app_shell.o .././.build_XC-1A/mox_comm_c.o .././.build_XC-1A/mox_log.o .././.build_XC-1A/mox_logger.o .././.build_XC-1A/mox_module.o .././.build_XC-1A/mox_storage.o .././.build_XC-1A/mox_threads.o .././.build_XC-1A/module_flash.o .././.build_XC-1A/mox_master_c.o .././.build_XC-1A/mox_slave_c.o .././.build_XC-1A/mox.o .././.build_XC-1A/mox_comm_xc.o .././.build_XC-1A/spi_flash.o .././.build_XC-1A/spi_master.o .././.build_XC-1A/mox_master_xc.o .././.build_XC-1A/mox_slave_xc.o .././.build_XC-1A/dbg-malloc.o .././XC-1A.xn   -o ../bin/XC-1A/os_flasher.xe
cmd /c if not exist  .\.build_XC-1A\fake_inc mkdir  .\.build_XC-1A\fake_inc > nul
cmd /c if exist ".\.build_XC-1A\fake_inc" RMDIR /S /Q ".\.build_XC-1A\fake_inc"
echo Build Complete
